package com.nwcl.basic.service.impl;

import com.nwcl.basic.bo.GoodsIntegralBO;
import com.nwcl.basic.dao.GoodsIntegralDao;
import com.nwcl.basic.entity.GoodsIntegral;
import com.nwcl.basic.service.GoodsIntegralService;
import com.nwcl.common.utils.BeanUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author liguiqin
 * @date 2023/5/23
 */
@Service
public class GoodsIntegralServiceImpl implements GoodsIntegralService {
    @Autowired
    private GoodsIntegralDao goodsIntegralDao;
    @Override
    public GoodsIntegralBO getByGoodsId(Integer goodsId) {
        GoodsIntegral goodsIntegral= goodsIntegralDao.getByGoodsId(goodsId);
        if(goodsIntegral==null){
            return null;
        }
        return BeanUtil.copy(goodsIntegral,GoodsIntegralBO.class);
    }
}
